Add type annotations and mypy CI to flatdata-py and flatdata-generator#262
Merged
VeaaC merged 23 commits intoheremaps:masterfrom Apr 27, 2026
Merged
Add type annotations and mypy CI to flatdata-py and flatdata-generator#262VeaaC merged 23 commits intoheremaps:masterfrom
VeaaC merged 23 commits intoheremaps:masterfrom
Conversation
76e1c61 to
4268fd0
Compare
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
…ping When archive_name is a str, the method returns tuple[ModuleType, Any]. When archive_name is None (default), it returns just ModuleType. Without overloads, mypy sees the union return type and rejects tuple unpacking at call sites (attr-defined: Module has no __iter__). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
Signed-off-by: Christian Vetter <christian.vetter@here.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds type annotations to all source functions/methods in both Python projects and
enforces them via mypy in CI.
What changed
Type annotations added.
mypy configuration (both
pyproject.toml): 9 strictness flags enabled —disallow_untyped_defs,check_untyped_defs,disallow_any_generics,warn_return_any,warn_unused_configs,warn_redundant_casts,warn_unused_ignores,no_implicit_optional,strict_equality. Namespacepackage settings for the shared
flatdata/namespace.CI: mypy steps added to
generator.ymlandpy.yml, running after tests.PEP 561:
py.typedmarkers inflatdata/lib/andflatdata/generator/.